package com.thx.workflow.custom.model;

import java.util.HashMap;
import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.topdt.jbpm.form.Document;

/**
 * 政府公文实体
 * 建立日期 : 2015年12月25日 下午4:15:45<br>
 * 作者 : 冯晋首<br>
 * 模块 : <br>
 * 描述 : <br>
 * 修改历史: 序号 日期 修改人 修改原因 <br>
 * 1 <br>
 * 2 <br>
 */
@Entity
@Table(name = "bus_gov_official_doc")
public class OfficialDoc  implements Document{
	
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "uuid")
	@Column(length = 50)
	private String id;
	private String workId;
	/**
	 * 公司标识
	 */
	@Column
	protected String companyId;	
	/**
	 * 文件名称
	 */
	@Column(name = "doc_name")
	private String docName;
	/**
	 * 紧急程度
	 */
	@Column(name = "emergency_level")
	private String emergencyLevel;
	/**
	 * 是否公开
	 */
	@Column(name = "is_public")
	private String isPublic;
	/**
	 * 文号
	 */
	@Column(name = "doc_num")
	private String docNum;

	/**
	 * 打印份数
	 */
	@Column(name = "print_num")
	private Integer printNum;
	/**
	 * 发文日期
	 */
	@Column(name = "publish_date")
	private String publishDate;
	/**
	 * 主送
	 */
	@Column(name = "main_send")
	private String mainSend;
	/**
	 * 抄送
	 */
	@Column(name = "copy_send")
	private String copySend;
	/**
	 * 发文范围
	 */
	@Column(name = "doc_range")
	private String docRange;
	/**
	 * 负责人
	 */
	@Column(name = "under_taker")
	private String underTaker;
	/**
	 * 联系方式
	 */
	@Column(name = "contact_way")
	private String contactWay; 
	/**
	 * 签发日期
	 */
	@Column(name = "signature_date")	
	private String signatureDate;
	/**
	 * 年份
	 */
	@Column(name = "doc_year")	
	private String docYear;
	public String getDocYear() {
		return docYear;
	}

	public void setDocYear(String docYear) {
		this.docYear = docYear;
	}

	public String getSignatureDate() {
		return signatureDate;
	}

	public void setSignatureDate(String signatureDate) {
		this.signatureDate = signatureDate;
	}

	public OfficialDoc() {
		
	}

	@Override
	public String getDocId() {
		return this.workId;
	}

	@Override
	public void setDocId(String docId) {
		this.workId = docId;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getDocName() {
		return docName;
	}

	public void setDocName(String docName) {
		this.docName = docName;
	}

	public String getEmergencyLevel() {
		return emergencyLevel;
	}

	public void setEmergencyLevel(String emergencyLevel) {
		this.emergencyLevel = emergencyLevel;
	}

	public String getIsPublic() {
		return isPublic;
	}

	public void setIsPublic(String isPublic) {
		this.isPublic = isPublic;
	}

	public String getDocNum() {
		return docNum;
	}

	public void setDocNum(String docNum) {
		this.docNum = docNum;
	}

	public Integer getPrintNum() {
		return printNum;
	}

	public void setPrintNum(Integer printNum) {
		this.printNum = printNum;
	}

	public String getPublishDate() {
		return publishDate;
	}

	public void setPublishDate(String publishDate) {
		this.publishDate = publishDate;
	}

	public String getMainSend() {
		return mainSend;
	}

	public void setMainSend(String mainSend) {
		this.mainSend = mainSend;
	}

	public String getCopySend() {
		return copySend;
	}

	public void setCopySend(String copySend) {
		this.copySend = copySend;
	}

	public String getDocRange() {
		return docRange;
	}

	public void setDocRange(String docRange) {
		this.docRange = docRange;
	}

	public String getUnderTaker() {
		return underTaker;
	}

	public void setUnderTaker(String underTaker) {
		this.underTaker = underTaker;
	}

	public String getContactWay() {
		return contactWay;
	}

	public void setContactWay(String contactWay) {
		this.contactWay = contactWay;
	}

	public String getCompanyId() {
		return companyId;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getWorkId() {
		return workId;
	}

	public void setWorkId(String workId) {
		this.workId = workId;
	}

	@Override
	public Map<String, Object> getDataMap() {
		Map<String, Object> data = new HashMap<String, Object>();
		data.put("id", this.id);
		data.put("workId", this.workId);
		data.put("docName", this.docName);
		data.put("emergencyLevel", this.emergencyLevel);
		data.put("isPublic", this.isPublic);
		data.put("docNum", this.docNum);
		data.put("printNum", this.printNum.toString());
		data.put("publishDate", this.publishDate);
		data.put("mainSend", this.mainSend);
		data.put("copySend", this.copySend);
		data.put("docRange", this.docRange);
		data.put("underTaker", this.underTaker);
		data.put("contactWay", this.contactWay);
		data.put("signatureDate", this.signatureDate);
		data.put("docYear", this.docYear);
		return data;
	}



}